package com.business.exam.service;

import com.business.exam.domain.question.Question;
import com.business.exam.domain.question.QuestionEditRequestVM;
import com.business.exam.domain.question.QuestionPageRequestVM;
import com.business.exam.domain.question.QuestionResponseVM;

import java.util.List;
import java.util.Map;

public interface IQuestionService {

    /**
     * 查询分页列表
     */
    List<QuestionResponseVM> page(QuestionPageRequestVM requestVM);

    QuestionEditRequestVM getQuestionEditRequestVM(Integer questionId);

    QuestionEditRequestVM getQuestionEditRequestVM(Question question);

    Question insertFullQuestion(QuestionEditRequestVM model, Integer userId);

    Question updateFullQuestion(QuestionEditRequestVM model);

    Question selectById(Integer id);

    void updateByPrimaryKeySelective(Question question);

    /**
     * 匹配题库分类ID
     * @param gradeLevel
     * @return
     */
    Integer selectCategoryIdByContent(String gradeLevel);

    Integer selectKnowledgeIdByContent(String subjectId);
    /**
     * 按照题库分类查询所包含的各题型个数
     * @param model
     * @return
     */
    Map<String, Object> selectTotalQuestion(QuestionPageRequestVM model);
}
